import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'home'
  },
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
 
  {
    path: '/quanbusanpin',//全部商品
    name: 'QuanBuSanPin',
    component: () => import(/* webpackChunkName: "quanbusanpin" */ '../views/QuanBuSanPin.vue')
  },{
    path: '/gerenzonxin',//个人中心
    name: 'GeRenZonXin',
    component: () => import(/* webpackChunkName: "quanbusanpin" */ '../views/GeRenZonXin.vue')
  },{
    path: '/wodedindan',//我的订单
    name: 'WoDeDinDan',
    component: () => import(/* webpackChunkName: "quanbusanpin" */ '../views/WoDeDinDan.vue')
  },{
    path: '/zhuanshufuli',//专属福利
    name: 'ZhuanShuFuLi',
    component: () => import(/* webpackChunkName: "ZhuanShuFuLi" */ '../views/ZhuanShuFuLi.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
